package com.cqhgcloud.monarch.organ.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.cqhgcloud.monarch.organ.mapper.SysMenuMapper;
import com.cqhgcloud.monarch.organ.entity.SysMenu;
import com.cqhgcloud.monarch.organ.service.SysMenuService;
import lombok.AllArgsConstructor;

/**
 * @param 系统菜单信息表
 * @author weimeilayer@gmail.com
 * @date 2020-01-31 22:33:01
 */

@Service
@AllArgsConstructor
public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements SysMenuService {
	
	@Override
	public IPage<SysMenu> queryPage(Page page,SysMenu sysMenu) {
		IPage<SysMenu> pages =baseMapper.selectPage(page,Wrappers.query(sysMenu));
		page.setTotal(baseMapper.selectCount(Wrappers.query(sysMenu)));
		return pages;
	}
}